package com.zhang.client;

import com.zhang.entity.*;
import com.zhang.result.RetVal;
import com.zhang.search.SearchParam;
import com.zhang.search.SearchResponseVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

//该远程接口是由哪个微服务去实现
@FeignClient(value = "shop-search")
public interface SearchFeignClient {
    //2.商品的上架
    @GetMapping("/search/onSale/{skuId}")
    public RetVal onSale(@PathVariable Long skuId);

    //2.商品的下架
    @GetMapping("/search/offSale/{skuId}")
    public RetVal offSale(@PathVariable Long skuId);

    //2.商品的搜索:根据传入的查询条件进行搜索，将得到的结果封装到SearchResponseVo
    @PostMapping("/search/searchProduct")
    public RetVal searchProduct(@RequestBody SearchParam searchParam);
}
